From: Richard M. Stallman Date: Thu, 20 Jan 1994 15:12:30 +0000 (+0000) Subject: (enable-flow-control-on): Do nothing if no TERM. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~93417 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=3bf5f17a187f06908852543b43ae9037a2985294;p=emacs.git (enable-flow-control-on): Do nothing if no TERM. --- diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el index ec76e29bfdf..3e271510ff5 100644 --- a/lisp/flow-ctrl.el +++ b/lisp/flow-ctrl.el @@ -102,11 +102,13 @@ you must type C-\\ to get the effect of a C-s, and type C-^ to get the effect of a C-q." (let ((term (getenv "TERM")) hyphend) - ;; Strip off hyphen and what follows - (while (setq hyphend (string-match "[-_][^-_]+$" term)) - (setq term (substring term 0 hyphend))) - (and (member term losing-terminal-types) - (enable-flow-control)))) + (if term + (progn + ;; Strip off hyphen and what follows + (while (setq hyphend (string-match "[-_][^-_]+$" term)) + (setq term (substring term 0 hyphend))) + (and (member term losing-terminal-types) + (enable-flow-control)))))) (provide 'flow-ctrl)